package com.gk.panda.apis.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gk.panda.apis.entity.elecRail.dto.ElecRailSearchDto;
import com.gk.panda.apis.entity.elecRail.dto.HeatMapGeoJsonDto;
import com.gk.panda.apis.entity.elecRail.entity.RegionalPersonCount;
import com.gk.panda.apis.entity.elecRail.vo.CrownMoveVo;
import com.gk.panda.apis.entity.elecRail.vo.HeatMapVo;
import com.gk.panda.pojo.ElecRail;
import com.gk.panda.pojo.GeoJson;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: ElecRailService
 * @Description: 电子围栏接入
 * @author: wangchao
 * @date: 2022/11/14 10:04
 * @version: 1.0
 **/
public interface ElecRailService extends IService<ElecRail> {

    /**
     * @description: 调用电子围栏接口获取热力统计数据
     * @param: [areaCode：区域ID]
     * @param: [queryDate：查询时间，格式为：YYYYMMDDHH]
     * @return:
     * @date: 2022/11/14 10:05
     * @version: 1.0
     **/
    public List<HeatMapVo> getRegionalHeat(String areaCode, String queryDate) throws Exception;

    /**
     * @description: 调用电子围栏接口获取人员移动数据
     * @param: [areaCode：区域ID]
     * @param: [queryDate：查询时间，格式为：YYYYMMDDHH]
     * @return:
     * @date: 2022/11/23 15:58
     * @version: 1.0
     **/
    public List<CrownMoveVo> getCrownMoveData(String areaCode, String queryDate) throws Exception;

    /**
     * @description: 获取某时刻多个区域内的热力图geoJson数据
     * @param: [areaCode：区域ID]
     * @param: [queryDate：查询时间，格式为：YYYYMMDDHH]
     * @return:
     * @date: 2022/11/14 16:02
     * @version: 1.0
     **/
    public List<GeoJson> RegionalHeatOfGIS(HeatMapGeoJsonDto dto) throws Exception;

    /**
     * @description: 分页查询电子围栏数据
     * @param dto : 电子围栏查询类
     * @return
     */
    Page<ElecRail> getElecRailList(ElecRailSearchDto dto);

    /**
     * @description: 获取热力图区域人数统计
     * @return
     */
    Map<String,Object> getRegionalPersonCount() throws Exception;

    /**
     * 通过时间查热力图人数统计
     * @param queryDate
     * @return
     * @throws Exception
     */
    RegionalPersonCount getPersonCountByTime(String queryDate) throws Exception;

    /**
     * @description: 获取热力图人员移动geoJson数据
     * @return
     */
    List<GeoJson> getCrowdMove(HeatMapGeoJsonDto dto) throws Exception;

    /**
     * @description: 存储人员移动数据
     * @throws Exception
     */
    void saveCrownMoveData() throws Exception;

    /**
     * @description: 删除人员移动数据
     * @param queryDate
     */
    void removeCrownMoveData(String queryDate);

    /**
     * 存储热力图geoJson数据
     * @throws Exception
     */
    void saveHeatMapData() throws Exception;

    //存储每天的人次
    void savePersonCountOfDay() throws Exception;

//    void test() throws Exception;
}
